import axios from "../../axios"

export function addAutoOrder(data) {
    return axios({
        method: 'POST',
        url: '/addAutoOrder',
        data: data,
    })
}

// export function addAutoOrder(autoOrderData){
//     axios.post('/addAutoOrder', autoOrderData, {
//     headers: {
//         'Content-Type': 'mutipart/json',
//     },
//     })
// } 

export function addRepairOrder(data) {
    return axios({
        method: 'POST',
        url: '/addRepairOrder',
        data: data,
    })
}

export function getAutoOrderId(submitTime) {
    return axios.get('/getAutoOrderId?submitTime=' + submitTime )
}

export function getRepairOrderId(submitTime) {
    return axios.get('/getRepairOrderId?submitTime=' + submitTime )
}

export function updateAutoOrderProgress(orderId,autoOrderProgress) {
    return axios.put('/updateAutoOrderProgress?orderId=' + orderId + '&autoOrderProgress=' + autoOrderProgress)
}

export function updateRepairOrderProgress(orderId,repairOrderProgress) {
    return axios.put('/updateRepairOrderProgress?orderId=' + orderId + '&repairOrderProgress=' + repairOrderProgress)
}

export function updateAutoOrderStatusDone(autoOrderId) {
    return axios.put('/updateAutoOrderStatusDone?autoOrderId=' + autoOrderId )
}

export function updateRepairOrderStatusDone(repairOrderId) {
    return axios.put('/updateRepairOrderStatusDone?repairOrderId=' + repairOrderId )
}
